
% Objective-C Foundation Reference Card (part 5)
% Copyright (c) 2003-2005 Dick van Oudheusden
% TeX Format

% Uncomment the following line for dvi/ps generation: tex ofc-refcard5.tex; dvips -o ofc-refcard5.ps ofc-refcard5.dvi
%\input outopt.tex

% Uncomment the following three lines for PDF generation: pdftex ofc-refcard5.tex
\pdfoutput=1
\pdfpageheight=21cm
\pdfpagewidth=29.7cm

% Font definitions
\font\bigbf=cmb12
\font\smallbf=cmb10
\font\smallrm=cmr8
\font\smalltt=cmtt8
\font\smallit=cmmi8
\font\tinyit=cmmi5

\def\cm#1#2{{\smalltt#1}\dotfill{\smallrm#2}\par}
\def\cl#1#2{\hskip 12pt$\lfloor${\smalltt#1}\dotfill{\smallrm#2}\par}
\def\cn#1{\hfill$\lfloor$ {\smallrm#1}\par}
\def\sect#1{\vskip 0.7cm \hfil{\smallbf#1}\hfil\par}
\def\para#1{{\smallit#1}\par}
\def\vsep{\vskip 6pt}

% Characters definitions
\def\bs{$\backslash$}
\def\backspace{$\leftarrow$}
\def\ctrl{{\rm\char94}\kern-1pt}
\def\enter{$\hookleftarrow$}
\def\or{\thinspace{\tinyit{or}}\thinspace}
\def\key#1{$\langle${\rm{\it#1}}$\rangle$}
\def\rapos{\char125}
\def\lapos{\char123}
\def\bs{\char92}
\def\tild{\char126}

% Three columns definitions
\parindent 0pt
%\nopagenumbers
\hoffset=-1.56cm
\voffset=-1.54cm
\newdimen\fullhsize
\fullhsize=27.9cm
\hsize=8.5cm
\vsize=19cm
\def\fullline{\hbox to\fullhsize}
\let\lr=L
\newbox\leftcolumn
\newbox\midcolumn
\output={
  \if L\lr
    \global\setbox\leftcolumn=\columnbox
    \global\let\lr=M
  \else\if M\lr
    \global\setbox\midcolumn=\columnbox
    \global\let\lr=R
  \else
    \tripleformat
    \global\let\lr=L
  \fi\fi
  \ifnum\outputpenalty>-20000
  \else
    \dosupereject
  \fi}
\def\tripleformat{
  \shipout\vbox{\fullline{\box\leftcolumn\hfil\box\midcolumn\hfil\columnbox}}
  \advancepageno}
\def\columnbox{\leftline{\pagebody}}

% Card content
% Header
%\hrule\vskip 3pt
\hfil{\bf OBJECTIVE-C FOUNDATION CLASSES}\hfil\par
\hfil{\bf REFERENCE CARD}\hfil\par
\hfil{\bf Part 5: Compound classes}\hfil\par
\vskip 2pt\hrule

\sect{DArguments}
\para{Methods}
\cm{- init}{Init an argument parser}
\cm{- deepen}{Not implemented}
\cm{- free}{Free the parser, incl. options}
\cm{- option :(char *) longOpt :(char) shortOpt}{}
\cl{:(char *) descr :(id) target}{Add an option}
\cm{- options :(DArgOption *) options :(int) nr}{}
\cn{Add multiple options}
\cm{- parse :(char *) name :(char *) usage :(char *) version}{}
\cl{:(char *) tail :(char **) argv :(int) argc}{}
\cn{Parse and process the arguments}
\cm{- printVersion :(char *) version}{Print version info}
\cm{- printOptionHelp :(char) shortOpt :(int) longCol }{}
\cl{:(char *) longOpt :(char *) descr}{Print option help}
\cm{- printHelp :(char *) usage :(char *) tail}{Print all help}

\sect{DCalendar}
\para{Constants}
\cm{DCL\_SUNDAY}{Sunday}
\cm{DCL\_MONDAY}{Monday}
\cm{DCL\_TUESDAY}{Tuesday}
\cm{DCL\_WEDNESDAY}{Wednesday}
\cm{DCL\_THURSDAY}{Thursday}
\cm{DCL\_FRIDAY}{Friday}
\cm{DCL\_SATURDAY}{Saturday}
\cm{DCL\_ALL\_MONTHS}{All months in calendar}
\para{Methods}
\cm{+ (int) firstWeekDay}{Return first day of week}
\cm{+ firstWeekDay (int) day}{Set first day of week}
\cm{+ (BOOL) isLeapYear :(int) year}{Test for leap year}
\cm{+ (int) leapYears :(int) from :(int) to}{Count leap years}
\cm{+ (int) daysInMonth :(int) year :(int) month}{}
\cn{Return number of days in month}
\cm{+ (int) weekDay :(int) year :(int) month :(int) day}{}
\cn{Return day of week}
\cm{- init}{Init empty calendar}
\cm{- init :(int) year}{Init calendar with year}
\cm{- init :(int) year :(int) month}{Init calendar with}
\cn{year,month}
\cm{- (int) year}{Return current year}
\cm{- year :(int) year}{Set current year}
\cm{- (int) month}{Return current month}
\cm{- month :(int) month}{Set current month}
\cm{- (DData *) toData}{Get calendar in new data string}
\cm{- (DText *) toText}{Get calendar in new text string}

\sect{DConfigReader}
\para{Methods}
\cm{- init}{Init config reader}
\cm{- free}{Free config reader}
\cm{- (BOOL) parse :(id) source :(char *) name :(id) handler}{}
\cn{Parse the source with name, results to handler}

\sect{DConfigWriter}
\para{Methods}
\cm{- init}{Init config writer}
\cm{- init :(id) dest}{Init config writer with config dest.}
\cm{- free}{Free the config writer}
\cm{- (BOOL) startConfig :(id) dest}{Start writing config}
\cm{- (BOOL) startConfig}{Start writing config}
\cm{- (BOOL) endConfig}{Done writing config}
\cm{- (BOOL) section :(char *) name}{Write section in config}
\cm{- (BOOL) option :(char *) sect :(char *) opt}{}
\cl{:(char *) val}{Write option in config}
\cm{- (BOOL) comment :(char *) comment}{Write comment}
\cm{- (void) error :(int) number :(char *) name}{}
\cl{:(int) lineNumber :(int) columnNumber}{Report error}

\sect{DConfigTree}
\para{Methods}
\cm{- init}{Init an empty config tree}
\cm{- init :(id src :(char *) name}{Init config tree with src}
\cm{- free}{Free config tree}
\cm{- (BOOL) read :(id) srce :(char *) name}{}
\cn{Read config tree from source}
\cm{- (BOOL) write :(id) dest :(char *) name}{}
\cn{Write config tree to dest}
\cm{- (BOOL) set :(char *) sect :(char *) opt :(char *) val}{}
\cn{Set/Insert an option for a section}
\cm{- (char *) get :(char *) sect :(char *) opt}{Get an option}
\cm{- (BOOL) has :(char *) sect}{Check for a section}
\cm{- (BOOL) has :(char *) sect :(char *) opt}{}
\cn{Check for an option}
\cm{- (BOOL) remove :(char *) sect}{Remove a section}
\cm{- (BOOL) remove :(char *) sect :(char *) opt}{}
\cn{Remove an option}
\cm{- (DList *) sections}{Return a list with all sections}
\cm{- (DList *) options :(char *) section}{}
\cn{Return all options for a section}

\sect{DDiscreteDistribution}
\para{Methods}
\cm{- init}{Init discrete distribution}
\cm{- free}{Free distribution}
\cm{- (int) length}{Return number values in distribution}
\cm{- (double) sum}{Return sum values in distribution}
\cm{- (double) sumSquared}{Return squared sum of values}
\cm{- (BOOL) range :(double) min :(double) max}{}
\cn{Add score with range [min,max$\rangle$}
\cm{- (BOOL) range :(int) value}{}
\cn{Add score with range [v-0.5,v+0.5$\rangle$}
\cm{- reset}{Reset length, sums and scores}
\cm{- (BOOL) update :(double) value}{}
\cn{Update distribution with value}
\cm{- (double) mean}{Calculate mean of values}
\cm{- (double) average}{Calculate average of values}
\cm{- (double) variance}{Calculate variance of values}
\cm{- (double) standardDeviation}{Calculate SD of values}
\cm{- (DListIterator *) scores}{Return iterator on score list}

\sect{DFSM}
\para{Methods}
\cm{- init}{Init empty finite state machine}
\cm{- copy}{Copy FSM}
\cm{- shallowFree}{Free FSM, excluding states}
\cm{- free}{Free FSM, including states}
\cm{- (BOOL) isChanged}{State change after event?}
\cm{- (DFSMState *) current}{Get the current state}
\cm{- (DFSMState *) previous}{Get the previous state}
\cm{- transition :(DFSMState*)o:(DBitArray*)t:(DFSMState*)d}{}
\cn{Add transition from o to d after event in t}
\cm{- (DFSMState *) start :(DFSMState *)}{Start FSM from state}
\cm{- (DFSMState *) feed :(int) event}{Feed event}

\sect{DFSMState}
\para{Methods}
\cm{- init}{Init empty FSM state}
\cm{- copy}{Copy FSM state}
\cm{- free}{Free FSM state, including transitions}

\sect{DImageHeader}
\para{Constants}
\cm{DIM\_UNKN}{Unknown file format}
\cm{DIM\_JPEG}{JPEG file format}
\cm{DIM\_GIF}{GIF file format}
\cm{DIM\_PNG}{PNG file format}
\cm{DIM\_BMP}{BMP file format}
\cm{DIM\_PCX}{PCX file format}
\cm{DIM\_IFF}{IFF file format}
\cm{DIM\_RAS}{RAS file format}
\cm{DIM\_PBM}{PBM file format}
\cm{DIM\_PGM}{PGM file format}
\cm{DIM\_PPM}{PPM file format}
\cm{DIM\_PSD}{PSD file format}
\cm{DIM\_SWF}{SWF file format}
\para{Methods}
\cm{- init}{Init an empty image header}
\cm{- init :(id <DDataReadable>) file}{Ini with a data readable}
\cm{- (BOOL) inspect :(id <DDataReadable>) file}{}
\cn{Inspect the image via readable}
\cm{- (char *) extension}{Return file extension for image}
\cm{- (char *) mime\_type}{Return mime type for image}
\cm{- (DImageHeaderType) type}{Return the image type DIM\_{\dots}}

\sect{DLexer}
\para{Methods}
\cm{- init}{Init lexer}
\cm{- init :(id) source :(char *) name}{Init lexer with file}
\cm{- free}{Free the lexer}
\cm{- (const char *) text}{Return last scanned text}
\cm{- (const char *) name}{Return name current file}
\cm{- (int) lineNumber}{Return current line nr}
\cm{- (int) columnNumber}{Return current column nr}
\cm{- (BOOL) isEof}{Check for end of file reached}
\cm{- whiteSpace :(char *) expr}{Set white space expr}
\cm{- caseSensitive :(BOOL) cs}{Set case sensitivity}
\cm{- (BOOL) source :(id) source :(char *) name}{Start with source}
\cm{- (BOOL) popSource}{Pop source}
\cm{- (BOOL) nextWhiteSpace}{Skip white space}
\cm{- (BOOL) nextString :(char *) cstring}{Scan string}
\cm{- (BOOL) nextExpression :(char *) cstring}{Scan reg exp}
\cm{- (BOOL) nextLine}{Scan remaining of line}
\cm{- (BOOL) checkWhiteSpace}{Check white space}
\cm{- (BOOL) checkString :(char *) cstring}{Check string}
\cm{- (BOOL) checkExpression :(char *) cstring}{Check reg exp}
\cm{- next }{Move scanner position after check{\dots}}
\cm{- next :(unsigned) positions}{Move scanner position}
\cm{- error :(char *) msg}{Generate error on stderr}

\sect{DObjcTokenizer}
\para{Constants: General tokens}
\cm{DOT\_UNKNOWN}{Unknown token}
\cm{DOT\_EOFF}{End of file token}
\cm{DOT\_EOFL}{End of line token}
\cm{DOT\_WHITESPACE}{Whitespace token}
\cm{DOT\_COMMENT}{Comment token}
\cm{DOT\_IDENTIFIER}{Identifier token}
\cm{DOT\_OPERATOR}{Operator token}
\cm{DOT\_PREPROCESSOR}{Preprocessor token}
\para{Constants: Literal tokens}
\cm{DOT\_DEC\_NUMBER}{Decimal number token}
\cm{DOT\_OCT\_NUMBER}{Octal number token}
\cm{DOT\_HEX\_NUMBER}{Hex number token}
\cm{DOT\_FLP\_NUMBER}{Floating point number token}
\cm{DOT\_CHAR}{Character token}
\cm{DOT\_STRING}{String token}
\cm{DOT\_WIDE\_CHAR}{Wide character token}
\cm{DOT\_WIDE\_STRING}{Wide string token}
\cm{DOT\_OBJC\_STRING}{Objective-c string token}
\para{Constants: Preprocessor tokens}
\cm{DOT\_PASSERT}{Assert token}
\cm{DOT\_PDEFINE}{Define token}
\cm{DOT\_PELIF}{ElseIf token}
\cm{DOT\_PELSE}{Else token}
\cm{DOT\_PENDIF}{Endif token}
\cm{DOT\_PERROR}{Error token}
\cm{DOT\_PIDENT}{Ident token}
\cm{DOT\_PIF}{If token}
\cm{DOT\_PIFDEF}{Ifdef token}
\cm{DOT\_PIFNDEF}{Ifndef token}
\cm{DOT\_PINCLUDE}{Include token}
\cm{DOT\_PIMPORT}{Import token}
\cm{DOT\_PLINE}{Line token}
\cm{DOT\_PPRAGMA}{Pragma token}
\cm{DOT\_PUNASSERT}{Unassert token}
\cm{DOT\_PUNDEF}{Undefine token}
\cm{DOT\_PWARNING}{Warning token}
\para{Constants: Predefined types}
\cm{DOT\_TCHAR}{Char token}
\cm{DOT\_TDOUBLE}{Double token}
\cm{DOT\_TFLOAT}{Float token}
\cm{DOT\_TINT}{Integer token}
\cm{DOT\_TSHORT}{Short token}
\cm{DOT\_TLONG}{Long token}
\cm{DOT\_TUNSIGNED}{Unsigned token}
\para{Constants: Storage tokens}
\cm{DOT\_AUTO}{Auto token}
\cm{DOT\_CONST}{Const token}
\cm{DOT\_EXTERN}{Extern token}
\cm{DOT\_REGISTER}{Register token}
\cm{DOT\_STATIC}{Static token}
\cm{DOT\_VOLATILE}{Volatile token}
\para{Constants: Type definition tokens}
\cm{DOT\_ENUM}{Enum token}
\cm{DOT\_STRUCT}{Struct token}
\cm{DOT\_TYPEDEF}{Typedef token}
\cm{DOT\_UNION}{Union token}
\para{Constants: Flow keywords}
\cm{DOT\_BREAK}{Break token}
\cm{DOT\_CASE}{Case token}
\cm{DOT\_CONTINUE}{Continu token}
\cm{DOT\_DEFAULT}{Default token}
\cm{DOT\_DO}{Do token}
\cm{DOT\_ELSE}{Else token}
\cm{DOT\_FOR}{For token}
\cm{DOT\_GOTO}{Goto token}
\cm{DOT\_IF}{If token}
\cm{DOT\_RETURN}{Return token}
\cm{DOT\_SWITCH}{Switch token}
\cm{DOT\_WHILE}{While token}
\para{Constants: Objective-c keywords}
\cm{DOT\_INTERFACE}{Interface token}
\cm{DOT\_IMPLEMENTATION}{Implementation token}
\cm{DOT\_PROTOCOL}{Protocol token}
\cm{DOT\_END}{End token}
\cm{DOT\_PRIVATE}{Private token}
\cm{DOT\_PROTECTED}{Protected token}
\cm{DOT\_PUBLIC}{Public token}
\cm{DOT\_SELECTOR}{Selector token}
\cm{DOT\_CLASS}{Class}
\cm{DOT\_ENCODE}{Encode token}
\cm{DOT\_DEFS}{Defs token}
\cm{DOT\_TRY}{Try token}
\cm{DOT\_CATCH}{Catch token}
\cm{DOT\_FINALLY}{Finally token}
\cm{DOT\_THROW}{Throw token}
\cm{DOT\_SYNCHRONIZED}{Synchronized token}
\cm{DOT\_SYNCHRONIZE}{Synchronize token}
\para{Constants: Logical operators}
\cm{DOT\_AND}{And token}
\cm{DOT\_OR}{Or token}
\cm{DOT\_NOT}{Not token}
\para{Constants: Comparison operators}
\cm{DOT\_SMALLER}{Smaller token}
\cm{DOT\_SMALLER\_EQUAL}{Smaller equal token}
\cm{DOT\_GREATER}{Greater token}
\cm{DOT\_GREATER\_EQUAL}{Greater equal token}
\cm{DOT\_EQUAL}{Equal token}
\cm{DOT\_NOT\_EQUAL}{Not equal token}
\para{Constants: Bitwise operators}
\cm{DOT\_BIT\_AND}{Bit and token}
\cm{DOT\_BIT\_OR}{Bit or token}
\cm{DOT\_BIT\_XOR}{Bit xor token}
\cm{DOT\_BIT\_NOT}{Bit not token}
\cm{DOT\_BIT\_LEFT}{Bit left token}
\cm{DOT\_BIT\_RIGHT}{Bit right token}
\para{Constants: General operators}
\cm{DOT\_COLON}{Colon token}
\cm{DOT\_SEMI\_COLON}{Semi-colon token}
\cm{DOT\_COMMA}{Comma token}
\cm{DOT\_BLOCK\_OPEN}{Block open token}
\cm{DOT\_BLOCK\_CLOSE}{Block close token}
\cm{DOT\_BRACE\_OPEN}{Brace open token}
\cm{DOT\_BRACE\_CLOSE}{Brace close token}
\cm{DOT\_BRACKET\_OPEN}{Bracket open token}
\cm{DOT\_BRACKET\_CLOSE}{Bracket close token}
\cm{DOT\_DEREFERNCE}{Dereference token}
\cm{DOT\_FIELD}{Field token}
\cm{DOT\_CONDITION}{Condition token}
\cm{DOT\_SIZEOF}{Sizeof token}
\cm{DOT\_ADDRESSOF}{Addressof token}
\cm{DOT\_VAR\_ARG}{Variable arguments token}
\cm{DOT\_PCONCAT}{Concatenation token}
\cm{DOT\_PSTRINGIFY}{Stringify token}
\para{Constants: Assignment operators}
\cm{DOT\_ASSIGNMENT}{Assignment token}
\cm{DOT\_PLUS\_ASSIGNMENT}{Plus assignment token}
\cm{DOT\_MINUS\_ASSIGNMENT}{Minus assignment token}
\cm{DOT\_MULT\_ASSIGNMENT}{Multiply assignment token}
\cm{DOT\_DIV\_ASSIGNMENT}{Division assignment token}
\cm{DOT\_REM\_ASSIGNMENT}{Remainder assignment token}
\cm{DOT\_LEFT\_ASSIGNMENT}{Bit left assignment token}
\cm{DOT\_RIGHT\_ASSIGNMENT}{Bit right assignment token}
\cm{DOT\_AND\_ASSIGNMENT}{Bit and assignment token}
\cm{DOT\_XOR\_ASSIGNMENT}{Bit xor assignment token}
\cm{DOT\_OR\_ASSIGNMENT}{Bit or assignment token}
\para{Constants: Arithmetic operators}
\cm{DOT\_INCREMENT}{Increment operator}
\cm{DOT\_DECREMENT}{Decrement operator}
\cm{DOT\_PLUS}{Plus operator}
\cm{DOT\_MINUS}{Minus operator}
\cm{DOT\_STAR}{Star operator}
\cm{DOT\_VALUEOF}{Value of operator}
\cm{DOT\_DIVISION}{Division operator}
\cm{DOT\_REMAINDER}{Remainder operator}
\para{Class methods}
\cm{+ (BOOL) isLogicalOperator :(int) token}{}
\cn{Check for logical operator token}
\cm{+ (BOOL) isComparisonOperator :(int) token}{}
\cn{Check for comparison operator token}
\cm{+ (BOOL) isBitOperator :(int) token}{}
\cn{Check for bit operator token}
\cm{+ (BOOL) isAssignmentOperator :(int) token}{}
\cn{Check for assignment operator token}
\cm{+ (BOOL) isArithmeticOperator :(int) token}{}
\cn{Check for arithmetic operator token}
\cm{+ (BOOL) isOperator :(int) token}{Check for an operator token}
\cm{+ (BOOL) isPredefinedTypeKeyword :(int) token}{}
\cn{Check for a predefined type token}
\cm{+ (BOOL) isStorageKeyword :(int) token}{}
\cn{Check for a storage keyword token}
\cm{+ (BOOL) isTypeDefinitionKeyword :(int) token}{}
\cn{Check for type definition token}
\cm{+ (BOOL) isFlowKeyword :(int) token}{}
\cn{Check for a flow keyword token}
\cm{+ (BOOL) isKeyword :(int) token}{Check for a keyword token}
\cm{+ (BOOL) isObjcKeyword :(int) token}{}
\cn{Check for an objc-keyword}
\cm{+ (BOOL) isDirective :(int) token}{Check for directive token}
\cm{+ (char *) operator :(int) token}{Return operator description}
\cm{+ (char *) keyword :(int) token}{Return keyword description}
\cm{+ (char *) objcKeyword :(int) token}{}
\cn{Return objc-keyword description}
\cm{+ (char *) directive :(int) token}{}
\cn{Return directive description}
\para{Object methods}
\cm{- (DObjcTokenizer *) init}{Init default tokenizer}
\cm{- init :(id) source :(char *) name}{Init tokenizer with source}
\cm{- free}{Free the tokenizer}
\cm{- (char *) text}{Return the last scanned text}
\cm{- (char *) name}{Return the name of the source}
\cm{- (int) lineNumber}{Return the current line number}
\cm{- (int) columnNumber}{Return the current column number}
\cm{- (BOOL) isEof}{Check if the end of the source is reached}
\cm{- (BOOL) skipWhiteSpace}{Check if white space must be skipped}
\cm{- skipWhiteSpace :(BOOL) skip}{Set skip white space}
\cm{- (BOOL) source :(id) source :(char *) name}{}
\cn{Start tokenizing source}
\cm{- (BOOL) popSource}{Pop source for sources stack}
\cm{- (int) nextToken}{Scan source for next token}
\cm{- (int) checkToken}{Check source for next token}
\cm{- next}{Move source location after checkToken}
\cm{- error :(char *) msg}{Generate error on stderr}

\sect{DProperty}
\para{Methods}
\cm{- init}{Init empty property}
\cm{- init :(char *) name :(id) value}{Init property}
\cm{- init :(char *) name}{Init property group}
\cm{- deepen}{Deepen a property after copy}
\cm{- free}{Free a property}
\cm{- (BOOL) isGroup}{Check if property is a group}
\cm{- (const char *) name}{Return name of property}
\cm{- (id) value}{Return value reference of the property}
\cm{- property :(char *) name :(id) value}{Set the property}
\cm{- group :(char *) name}{Set the property group}

\sect{DPropertyTree}
\para{Methods}
\cm{- init}{Init default property tree}
\cm{- init :(char *) name}{Init named property tree}
\cm{- free}{Free the property tree}
\cm{- (char *) name}{Return the name of the tree}
\cm{- name :(char *) name}{Set the name of the tree}
\cm{- group :(DProperty *) parent :(char *) name}{}
\cn{Add group property to the property tree}
\cm{- property :(DProperty *) parent :(char *) name}{}
\cl{:(id) value}{Add property to the property tree}
\cm{- (BOOL) read :(id) source :(char *) name}{}
\cn{Read the property tree and set the value references}
\cm{- (BOOL) write :(id) destination :(char *) name}{}
\cn{Write the property tree by reading the value references}
\cm{- (BOOL) remove :(DProperty *) property}{Remove property}
\cm{- (BOOL) remove :(DProperty *) parent :(char *) name}{}
\cn{Remove property by name}

\sect{DSource}
\para{Methods}
\cm{- init}{Init empty source}
\cm{- init :(id) source :(char *) name}{Init source with file}
\cm{- free}{Free the source}
\cm{- (const char *) name}{Return the name current source}
\cm{- (const char *) line}{Return remaining line}
\cm{- (int) lineNumber}{Return current line number}
\cm{- (int) columnNumber}{Return the current column number}
\cm{- (BOOL) set :(id) source :(char *) name}{Start with source}
\cm{- (BOOL) nextLine}{Get the next line}
\cm{- (BOOL) appendLine}{Append the next line}
\cm{- (BOOL) scanned :(unsigned) length}{Set length chars scanned}
\cm{- (BOOL) isLineScanned}{Check if full line scanned}
\cm{- (DSource *) error :(char *) msg}{Generate error on stderr}

\sect{DTokenizer}
\para{Methods}
\cm{- init}{Init tokenizer}
\cm{- init :(id) source :(char *) name}{Init tokenizer with file}
\cm{- free}{Free the tokenizer}
\cm{- (char *) text}{Return last scanned text}
\cm{- (const char *) name}{Return name current file}
\cm{- (int) lineNumber}{Return current line number}
\cm{- (int) columnNumber}{Return current column number}
\cm{- (BOOL) isEof}{Check for end of file}
\cm{- skipWhiteSpace :(BOOL) skip}{Set skip white space}
\cm{- (BOOL) skipWhiteSpace}{Return skip white space}
\cm{- (BOOL) source :(id) source :(char *) name}{Start with source}
\cm{- (BOOL) popSource}{Pop source from sources stack}
\cm{- (int) nextToken }{Scan source for token}
\cm{- (int) checkToken}{Check source for token}
\cm{- next }{Move source location after checkToken}
\cm{- next :(unsigned) positions}{Move source location}
\cm{- error :(char *) msg}{Generate error on stderr}
\para{Basic scanners, to be overridden}
\cm{- (DText *) whiteSpace :(char *) text }{White space scanner}
\cm{- (DText *) comment :(char *) text}{Comment scanner}
\cm{- (DText *) keyword :(char *) text }{Keyword scanner}
\cm{- (DText *) string :(char *) text }{String scanner}
\cm{- (DText *) operator :(char *) text}{Operator scanner}
\cm{- (DText *) number :(char *) text}{Number scanner}
\cm{- (DText *) extraToken1 :(char *) text}{Extra scanner}
\cm{- (DText *) extraToken2 :(char *) text }{Extra scanner}
\cm{- (DText *) extraToken3 :(char *) text }{Extra scanner}

\sect{DXMLNode}
\para{Constants}
\cm{DXML\_ELEMENT}{XML Element}
\cm{DXML\_ATTRIBUTE}{XML Attribute}
\cm{DXML\_TEXT}{XML Text}
\cm{DXML\_CDATA}{XML CData Text}
\cm{DXML\_PI}{XML Processing Instruction}
\cm{DXML\_COMMENT}{XML Comment}
\cm{DXML\_DOCUMENT}{XML Document}
\cm{DXML\_NAMESPACE}{XML Namespace}
\para{Methods}
\cm{- init}{Init empty xml node}
\cm{- init :(int) type :(char *) name :(char *) value}{}
\cn{Init xml node with type, name and value}
\cm{- deepen}{Deepen the copied node}
\cm{- free}{Free the node}
\cm{- (int) type}{Return the type of the node}
\cm{- (char *) name}{Return the name of the node}
\cm{- (char *) value}{Return the value of the node}
\cm{- set :(int) type :(char *) name :char *) value}{}
\cn{Set the type, name and value of the node}

\sect{DXMLTree : DTree}
\para{Methods}
\cm{- (DXMLTree *) init}{Init empty xml tree}
\cm{- init :(id) source :(char *) name :(char) separator}{}
\cn{Init xml tree with xml source}
\cm{- free}{Free the tree and the stored nodes}
\cm{- shallowFree}{Free the tree, not the stored nodes}
\cm{- (BOOL) read :(id) source :(char *) name :(char) sep}{}
\cn{Build xml tree from xml source}
\cm{- (BOOL) write :(id) destination :(char *) name}{}
\cn{Write xml tree to destination}

\sect{DXMLWriter}
\para{Methods}
\cm{- init}{Init default xml writer}
\cm{- init :(id) destination :(char) separator }{}
\cn{Init xml writer with a destination}
\cm{- free}{Free the writer}
\cm{- (BOOL) start :(id) destination :(char) separator}{}
\cn{Start the writing of a xml file}
\cm{- (BOOL) startDocument :(char *) version :(char *) enc}{}
\cl{:(int) standalone}{Write start of document}
\cm{- (BOOL) endDocument}{Write end of document}
\cm{- (BOOL) startElement :(char *) name}{Write start of element}
\cm{- (BOOL) attribute :(char *) attr :(char *) value}{}
\cn{Write attribute}
\cm{- (BOOL) endElement}{Write end of element}
\cm{- (BOOL) characters :(char *) text}{Write text}
\cm{- (BOOL) comment :(char *) text}{Write comment}
\cm{- (BOOL) processingInstruction :(char *) target}{}
\cl{:(char *) value}{Write PI}
\cm{- (BOOL) startCDATA}{Write start of CDATA section}
\cm{- (BOOL) endCDATA}{Write end of CDATA section}
\cm{- (BOOL) startNamespace :(char *) prefix :(char *) uri}{}
\cn{Write start of namespace}
\cm{- (BOOL) endNamespace}{Write end of namespace}
\cm{- (BOOL) unparsed :(char *) text}{Write unparsed text}
\cm{- (void) error :(int) number :(const char *) name}{}
\cl{:(int) lineNumber :(int) columnNumber}{Report error}

% Footer
\vfill \hrule\smallskip
{\smallrm Version 0.7.0. This card may be freely distributed under 
the terms of the GNU general public licence\par
Copyright \copyright\ {\oldstyle 2003-2005} by Dick van Oudheusden}

% Ending
\supereject
\if L\lr \else\null\vfill\eject\fi
\if L\lr \else\null\vfill\eject\fi
\bye

% EOF
